/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class SongToneSongPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "songId")
    private int songId;
    @Basic(optional = false)
    @Column(name = "ringtoneId")
    private int ringtoneId;

    public SongToneSongPK() {
    }

    public SongToneSongPK(int songId, int ringtoneId) {
        this.songId = songId;
        this.ringtoneId = ringtoneId;
    }

    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    public int getRingtoneId() {
        return ringtoneId;
    }

    public void setRingtoneId(int ringtoneId) {
        this.ringtoneId = ringtoneId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) songId;
        hash += (int) ringtoneId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongToneSongPK)) {
            return false;
        }
        SongToneSongPK other = (SongToneSongPK) object;
        if (this.songId != other.songId) {
            return false;
        }
        if (this.ringtoneId != other.ringtoneId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongToneSongPK[songId=" + songId + ", ringtoneId=" + ringtoneId + "]";
    }

}
